Depth offset compression

ABSTRACT

Zmin and Zmax are determined for depth offset compression. Then a check determines whether Zmin is equal to Zmax. If so, only one of Zmin and Zmax is used for depth offset compression and no index mask may be used. The bits that are saved thereby may be used for other purposes, including improving precision.

BACKGROUND

Compression methods are becoming increasingly important for graphicshardware architectures, since they may reduce the power used andincrease performance. Compression of depth can be done in a variety ofways.

Depth offset (DO) compression is an extremely simple method forcompressing depth. A tile, which is a rectangular region of depths, iscompressed at a time. The minimum and maximum depths, denoted Zmin andZmax, are found in the tile. For each depth value, one bit is storedwhich indicates whether the depth is encoded with respect to the Zmin orZmax. For each depth, a residual against Zmin or Zmax is then stored.

If all the compressed residuals are small enough so they fit within thedesired bit budget for the tile, then compression succeeds. Otherwise,the data may be stored in uncompressed form, or compressed using someother method.

Better compression is always desired because it can help to lower powerconsumption and/or may increase performance. Bandwidth can besignificantly lowered when a large percentage of tiles can becompressed, and/or if a few tiles can be compressed with a highcompression ratio.

BRIEF DESCRIPTION OF THE DRAWINGS

Some embodiments are described with respect to the following figures:

FIG. 1 shows a compressed depth architecture according to oneembodiment;

FIG. 2 is a flow chart for one embodiment;

FIG. 3 is a flow chart for one embodiment;

FIG. 4 is a flow chart for one embodiment;

FIG. 5 is a flow chart for one embodiment;

FIG. 6 is a system depiction for one embodiment; and

FIG. 7 is a front elevation for one embodiment.

DETAILED DESCRIPTION

“Meaningless” combinations that are present in the DO compression schememay be exploited to achieve better compression. Zmin and Zmax describereference points from where positive and (implicitly) negative residualsare encoded, respectively. Assume that b bits are used for each of Zminand Zmax, and k residual bits per depth. With this layout there areredundant ways to represent the same depth value since the ranges ofZmin and Zmax may overlap. Furthermore, Zmin must always be less thanZmax. In general, as long as Zmin+2^(k)>Zmax−2^(k), the same depth maybe encoded both relative to Zmin and to Zmax.

The number of valid combinations of Zmin and Zmax therefore becomes(2^(b)−2^(k)−1)²/2, while the allocated number of combinations usuallyfound in DO is 2^(b). This means that at least half of the combinationsare unused.

As an example, the percentage of redundant combinations for a 24 bitdepth buffer for a few different b and k values are as follows:

b k 24 22 20 18 16 20 56.1 71.9 19 53.1 61.7 87.5 18 51.6 56.1 71.9 1750.8 53.1 61.7 87.5 16 50.4 51.6 56.1 71.9 15 50.2 50.8 53.1 61.7 87.514 50.1 50.4 51.6 56.1 71.9 13 50.0 50.2 50.8 53.1 61.7 12 50.0 50.150.4 51.6 56.1

The redundancies described above can be used to improve compression. Forexample, assume that Zmin and Zmax are stored using 24 bits each, andthat the entire tile should be compressed down to 512 bits. If Zmin isequal to Zmax, then that equality may be used as a signal to interpretthe remaining 512−24=488 bits in a different way. Only 24 is subtractedsince 24 bits are gathered back from Zmin equals Zmax, which can be setto any value, as long as the Zmin-value is equal to the Zmax-value.

Note that this is just an example. Even more bits can be reclaimed bytaking into account all the combinations that Zmin>=Zmax can befulfilled, as well as all the redundant combinations in which the Zmin-and Zmax-ranges can overlap, as described previously.

One embodiment simply extends the residuals with the extra bit persample that would otherwise be used to index whether the residual isrelative to Zmin or Zmax.

Another embodiment spends the reclaimed bits on an alternativecompression algorithm altogether. The bits may be used to encode a planeequation with per-pixel residuals, for example.

Even more unnecessary combinations can be found by taking the index maskinto account. The index mask contains one bit per sample to selecteither Zmin or Zmax as the reference point for that sample. If all ofthe indices are 0 or if all of them are 1, then the Zmin or the Zmaxvalue will not be used in compression/decompression, and is thusredundant. This means that the bits allocated for either Zmin or Zmaxcan be used for other purposes as well. If the redundantZmin/Zmax-combinations described earlier are used, then the behavior ofthe index mask may be changed, and, thus, no further combinations aregained. For all of the valid Zmin/Zmax-combinations, however, the indexmask redundancy can be used.

In one embodiment this is used to improve the representable range, whileonly having one interval, by detecting whether there are all 0's or alll's in the index mask, and then utilize the unused bits of either Zminor Zmax to improve the precision of the residual values.

The information from Zmin and Zmax may also be utilized to create avariant of DO. As an example, assume that a Zmin and Zmax value arestored as usual. Assume that 6 new Z-values are uniformly created byinterpolation between Zmin and Zmax. Together with Zmin and Zmax, thereare 8 values to choose from. Each 2×2 subtile then stores 3 bits topoint into this palette of Z-values to identify a conservativeZmin-value, and another 3 bits to point to a conservative Zmax-value.The residuals are then computed relative to these new Zmin andZmax-values per 2×2 subtile. This can be generalized to any tile/subtilesizes and to any number of interpolated depths in between Zmin and Zmax(as long as it sums to an even 2^(n)).

It is also possible to gain another bit's worth of precision for Zmin orZmax using the redundant combinations. For example, assume that Zmin has16 bits precision and the target depth is 24. If Zmin>Zmax, then swapthem, but also set the 17th bit of Zmin to 1. Otherwise, if Zmin<Zmax,set the 17th bit of Zmin to 0. This way the extra bit increases theprecision of Zmin (or Zmax if desired).

Yet another way to exploit the extra bit from comparing Zmin againstZmax is the following. If Zmin>Zmax, then assume that the next W*H bitsis a clear mask, which indicates whether a pixel is cleared or not,where W is the tile width and H is the tile height. If there are fewnon-cleared depths, then these can be stored in uncompressed form, and,otherwise, residuals are stored as described above, but only for thenon-cleared pixels.

The discussion above has been with regard to depth, but the sameapproach applies to offset compression for color as well.

Taken together, the techniques above improve the original depth offset(DO) method in a number of different ways, and they increase the chancesthat DO succeeds at compressing a tile. This, in turn, may lead toreduced power consumption and/or increased performance.

Referring to FIG. 1, pixel pipelines 10 receive pixels from a rasterizer11. The rasterizer identifies which pixels lie within a trianglecurrently being rendered. The rasterizater may operate on a tile of n×mpixels at a time. When the rasterizer finds a tile that partiallyoverlap the triangle, it distributes the pixels in that tile over anumber of pixel pipelines 10. Each pixel pipeline computes the depth andcolor of a pixel.

The pixel pipelines 10 supply depth values to a depth comparison unit12. The depth comparison unit writes to a depth cache 14 and reads fromthe cache. On eviction, the depth cache sends depth data to a compressor16 for compression and ultimate storage, as compressed, in the nextlevel in the memory hierarchy 18. Information in that hierarchy may thenbe decompressed in decompressor 19 and supplied to the depth cache 14 sothat it can be read by the depth comparison unit 12. While the depthcache 14 is illustrated as holding 6 tiles, other sizes of depth cachemay be used.

Referring to FIGS. 2, 3, 4 and 5 the sequences set forth therein may beimplemented in software, firmware and/or hardware. In software andfirmware embodiments, they may be implemented by computer executedinstructions stored in one or more non-transitory computer readablemedia, such as magnetic, optical, or semiconductor storages. In oneembodiment, the compressor, shown in FIG. 1, may be processor-based andthe storage may be in association with the compressor.

The sequence 20 of FIG. 2 begins by determining whether Zmax is equal toZmin, as indicated in diamond 22. If so, only one of Zmin and Zmax isused with no index mask, as indicated in block 24.

Then the residuals may be extended by one bit per sample, as indicatedin block 26.

Referring to FIG. 3, the sequence 31 may also use steps 22 and 24 inFIG. 2. As shown in block 30, use the bits of Zmin and all remainingbits for a different compression algorithm.

In another case, represented in FIG. 4, it can be determined whether ornot all of the index mask bits are either ones or zeros, as indicated indiamond 40. If so, you can use the unused bits of Zmin or Zmax toimprove precision of Zmin or Zmax that is actually used, as indicated inblock 42.

Referring to the sequence 50 shown in FIG. 5, initially the Zmin andZmax values are stored as indicated in block 52. Then new Z values maybe interpolated (block 54) between the Zmin and the Zmax values. Forexample, six new Z values may be uniformly created by interpolationbetween Zmin and Zmax and then together with Zmin and Zmax there areeight values to choose from. In one embodiment, a tile may then bebroken into 2×2 subtiles. In any case, a tile is broken into subtiles ofthe desired size as indicated in block 56. Assign local Zmin and Zmaxvalues for each subtile by selecting among the interpolated depthvalues. Additional bits point to a conservative Zmax value. For exampleif a tile is broken into 2×2 subtiles, then each subtile stores threebits to point into the palette of Z values to identify a conservativeZmin value and another three bits point to a conservative Zmax value.The residuals are then computed relative to these new Zmin and Zmaxvalues per subtile. Assign local Zmin and Zmax values for each subtileby selecting among the interpolated depth values as indicated in block60. Then the residuals are computed relative to the new Zmin and Zmaxvalues per subtile as indicated in block 64. Of course any subtile andtile sizes may be used with any number of interpolated depths betweenZmin and Zmax as long as they sum to an even 2^(n).

The sequences of FIGS. 2-5 may be used separately or in combinations, insome embodiments.

FIG. 6 illustrates an embodiment of a system 700. In embodiments, system700 may be a media system although system 700 is not limited to thiscontext. For example, system 700 may be incorporated into a personalcomputer (PC), laptop computer, ultra-laptop computer, tablet, touchpad, portable computer, handheld computer, palmtop computer, personaldigital assistant (PDA), cellular telephone, combination cellulartelephone/PDA, television, smart device (e.g., smart phone, smart tabletor smart television), mobile internet device (MID), messaging device,data communication device, and so forth.

In embodiments, system 700 comprises a platform 702 coupled to a display720. Platform 702 may receive content from a content device such ascontent services device(s) 730 or content delivery device(s) 740 orother similar content sources. A navigation controller 750 comprisingone or more navigation features may be used to interact with, forexample, platform 702 and/or display 720. Each of these components isdescribed in more detail below.

In embodiments, platform 702 may comprise any combination of a chipset705, processor 710, memory 712, storage 714, graphics subsystem 715,applications 716 and/or radio 718. Chipset 705 may provideintercommunication among processor 710, memory 712, storage 714,graphics subsystem 715, applications 716 and/or radio 718. For example,chipset 705 may include a storage adapter (not depicted) capable ofproviding intercommunication with storage 714.

Processor 710 may be implemented as Complex Instruction Set Computer(CISC) or Reduced Instruction Set Computer (RISC) processors, x86instruction set compatible processors, multi-core, or any othermicroprocessor or central processing unit (CPU). In embodiments,processor 710 may comprise dual-core processor(s), dual-core mobileprocessor(s), and so forth. The processor may implement the sequences ofFIGS. 2-5 together with memory 712.

Memory 712 may be implemented as a volatile memory device such as, butnot limited to, a Random Access Memory (RAM), Dynamic Random AccessMemory (DRAM), or Static RAM (SRAM).

Storage 714 may be implemented as a non-volatile storage device such as,but not limited to, a magnetic disk drive, optical disk drive, tapedrive, an internal storage device, an attached storage device, flashmemory, battery backed-up SDRAM (synchronous DRAM), and/or a networkaccessible storage device. In embodiments, storage 714 may comprisetechnology to increase the storage performance enhanced protection forvaluable digital media when multiple hard drives are included, forexample.

Graphics subsystem 715 may perform processing of images such as still orvideo for display. Graphics subsystem 715 may be a graphics processingunit (GPU) or a visual processing unit (VPU), for example. An analog ordigital interface may be used to communicatively couple graphicssubsystem 715 and display 720. For example, the interface may be any ofa High-Definition Multimedia Interface, DisplayPort, wireless HDMI,and/or wireless HD compliant techniques. Graphics subsystem 715 could beintegrated into processor 710 or chipset 705. Graphics subsystem 715could be a stand-alone card communicatively coupled to chipset 705.

The graphics and/or video processing techniques described herein may beimplemented in various hardware architectures. For example, graphicsand/or video functionality may be integrated within a chipset.Alternatively, a discrete graphics and/or video processor may be used.As still another embodiment, the graphics and/or video functions may beimplemented by a general purpose processor, including a multi-coreprocessor. In a further embodiment, the functions may be implemented ina consumer electronics device.

Radio 718 may include one or more radios capable of transmitting andreceiving signals using various suitable wireless communicationstechniques. Such techniques may involve communications across one ormore wireless networks. Exemplary wireless networks include (but are notlimited to) wireless local area networks (WLANs), wireless personal areanetworks (WPANs), wireless metropolitan area network (WMANs), cellularnetworks, and satellite networks. In communicating across such networks,radio 718 may operate in accordance with one or more applicablestandards in any version.

In embodiments, display 720 may comprise any television type monitor ordisplay. Display 720 may comprise, for example, a computer displayscreen, touch screen display, video monitor, television-like device,and/or a television. Display 720 may be digital and/or analog. Inembodiments, display 720 may be a holographic display. Also, display 720may be a transparent surface that may receive a visual projection. Suchprojections may convey various forms of information, images, and/orobjects. For example, such projections may be a visual overlay for amobile augmented reality (MAR) application. Under the control of one ormore software applications 716, platform 702 may display user interface722 on display 720.

In embodiments, content services device(s) 730 may be hosted by anynational, international and/or independent service and thus accessibleto platform 702 via the Internet, for example. Content servicesdevice(s) 730 may be coupled to platform 702 and/or to display 720.Platform 702 and/or content services device(s) 730 may be coupled to anetwork 760 to communicate (e.g., send and/or receive) media informationto and from network 760. Content delivery device(s) 740 also may becoupled to platform 702 and/or to display 720.

In embodiments, content services device(s) 730 may comprise a cabletelevision box, personal computer, network, telephone, Internet enableddevices or appliance capable of delivering digital information and/orcontent, and any other similar device capable of unidirectionally orbidirectionally communicating content between content providers andplatform 702 and/display 720, via network 760 or directly. It will beappreciated that the content may be communicated unidirectionally and/orbidirectionally to and from any one of the components in system 700 anda content provider via network 760. Examples of content may include anymedia information including, for example, video, music, medical andgaming information, and so forth.

Content services device(s) 730 receives content such as cable televisionprogramming including media information, digital information, and/orother content. Examples of content providers may include any cable orsatellite television or radio or Internet content providers. Theprovided examples are not meant to limit the applicable embodiments.

In embodiments, platform 702 may receive control signals from navigationcontroller 750 having one or more navigation features. The navigationfeatures of controller 750 may be used to interact with user interface722, for example. In embodiments, navigation controller 750 may be apointing device that may be a computer hardware component (specificallyhuman interface device) that allows a user to input spatial (e.g.,continuous and multi-dimensional) data into a computer. Many systemssuch as graphical user interfaces (GUI), and televisions and monitorsallow the user to control and provide data to the computer or televisionusing physical gestures.

Movements of the navigation features of controller 750 may be echoed ona display (e.g., display 720) by movements of a pointer, cursor, focusring, or other visual indicators displayed on the display. For example,under the control of software applications 716, the navigation featureslocated on navigation controller 750 may be mapped to virtual navigationfeatures displayed on user interface 722, for example. In embodiments,controller 750 may not be a separate component but integrated intoplatform 702 and/or display 720. Embodiments, however, are not limitedto the elements or in the context shown or described herein.

In embodiments, drivers (not shown) may comprise technology to enableusers to instantly turn on and off platform 702 like a television withthe touch of a button after initial boot-up, when enabled, for example.Program logic may allow platform 702 to stream content to media adaptorsor other content services device(s) 730 or content delivery device(s)740 when the platform is turned “off.” In addition, chip set 705 maycomprise hardware and/or software support for 5.1 surround sound audioand/or high definition 7.1 surround sound audio, for example. Driversmay include a graphics driver for integrated graphics platforms. Inembodiments, the graphics driver may comprise a peripheral componentinterconnect (PCI) Express graphics card.

In various embodiments, any one or more of the components shown insystem 700 may be integrated. For example, platform 702 and contentservices device(s) 730 may be integrated, or platform 702 and contentdelivery device(s) 740 may be integrated, or platform 702, contentservices device(s) 730, and content delivery device(s) 740 may beintegrated, for example. In various embodiments, platform 702 anddisplay 720 may be an integrated unit. Display 720 and content servicedevice(s) 730 may be integrated, or display 720 and content deliverydevice(s) 740 may be integrated, for example. These examples are notmeant to be scope limiting.

In various embodiments, system 700 may be implemented as a wirelesssystem, a wired system, or a combination of both. When implemented as awireless system, system 700 may include components and interfacessuitable for communicating over a wireless shared media, such as one ormore antennas, transmitters, receivers, transceivers, amplifiers,filters, control logic, and so forth. An example of wireless sharedmedia may include portions of a wireless spectrum, such as the RFspectrum and so forth. When implemented as a wired system, system 700may include components and interfaces suitable for communicating overwired communications media, such as input/output (I/O) adapters,physical connectors to connect the I/O adapter with a correspondingwired communications medium, a network interface card (NIC), disccontroller, video controller, audio controller, and so forth. Examplesof wired communications media may include a wire, cable, metal leads,printed circuit board (PCB), backplane, switch fabric, semiconductormaterial, twisted-pair wire, co-axial cable, fiber optics, and so forth.

Platform 702 may establish one or more logical or physical channels tocommunicate information. The information may include media informationand control information. Media information may refer to any datarepresenting content meant for a user. Examples of content may include,for example, data from a voice conversation, videoconference, streamingvideo, electronic mail (“email”) message, voice mail message,alphanumeric symbols, graphics, image, video, text and so forth. Datafrom a voice conversation may be, for example, speech information,silence periods, background noise, comfort noise, tones and so forth.Control information may refer to any data representing commands,instructions or control words meant for an automated system. Forexample, control information may be used to route media informationthrough a system, or instruct a node to process the media information ina predetermined manner. The embodiments, however, are not limited to theelements or in the context shown or described in FIG. 6.

As described above, system 700 may be embodied in varying physicalstyles or form factors. FIG. 7 illustrates embodiments of a small formfactor device 800 in which system 700 may be embodied. In embodiments,for example, device 800 may be implemented as a mobile computing devicehaving wireless capabilities. A mobile computing device may refer to anydevice having a processing system and a mobile power source or supply,such as one or more batteries, for example.

As described above, examples of a mobile computing device may include apersonal computer (PC), laptop computer, ultra-laptop computer, tablet,touch pad, portable computer, handheld computer, palmtop computer,personal digital assistant (PDA), cellular telephone, combinationcellular telephone/PDA, television, smart device (e.g., smart phone,smart tablet or smart television), mobile internet device (MID),messaging device, data communication device, and so forth.

Examples of a mobile computing device also may include computers thatare arranged to be worn by a person, such as a wrist computer, fingercomputer, ring computer, eyeglass computer, belt-clip computer, arm-bandcomputer, shoe computers, clothing computers, and other wearablecomputers. In embodiments, for example, a mobile computing device may beimplemented as a smart phone capable of executing computer applications,as well as voice communications and/or data communications. Althoughsome embodiments may be described with a mobile computing deviceimplemented as a smart phone by way of example, it may be appreciatedthat other embodiments may be implemented using other wireless mobilecomputing devices as well. The embodiments are not limited in thiscontext.

The graphics processing techniques described herein may be implementedin various hardware architectures. For example, graphics functionalitymay be integrated within a chipset. Alternatively, a discrete graphicsprocessor may be used. As still another embodiment, the graphicsfunctions may be implemented by a general purpose processor, including amulticore processor.

The following clauses and/or examples pertain to further embodiments:

One example embodiment may be a method comprising determining, using ahardware processor, Zmin and Zmax for depth offset compression,determining whether Zmin is substantially equal to Zmax, and if so, onlyusing one of Zmin and Zmax for depth offset compression and refrainingfrom using an index mask. The method may include using bits saved byusing only one of Zmin or Zmax to extend residuals with one bit persample. The method may include using bits, saved by avoiding the need tospecify whether residuals are with respect to Zmin or Zmax, to use adifferent compression algorithm. The method may include determiningwhether Zmin is greater than Zmax and, if so, swapping precisions ofZmin and Zmax and using an extra bit with Zmin. The method may includedetermining whether Zmin is less than Zmax and, if so, using an extrabit to indicate that Zmin is less than Zmax. The method may includedetecting whether an index mask is all ones or zeros and, if so, usingunused bits of Zmin or Zmax to improve precision of reference valuesthat are actually used. The method may include if Zmin is less thanZmax, then using the next W×H bits as a clear mask to indicate whetherthe pixel is cleared or not, where W is a tile's width and H is a tile'sheight. The method may include storing depths in uncompressed formdepending on how many non-cleared depths exist. The method may includedetermining more than two depth values per tile. The method may includebreaking a tile into subtiles and assigning depth values to saidsubtiles, and selecting at least one subtile's depth value as a depthvalue of the tile.

Another example embodiment may be one or more non-transitory computerreadable media storing instructions executed by a processor to perform asequence comprising determining, using a hardware processor, Zmin andZmax for depth offset compression, determining whether Zmin issubstantially equal to Zmax; and if so, only using one of Zmin and Zmaxfor depth offset compression and refraining from using an index mask.The media may further store instructions to perform a sequence includingusing bits saved by using only one of Zmin or Zmax to extend residualswith one bit per sample. The media may further store instructions toperform a sequence including using bits, saved by avoiding the need tospecify whether residuals are with respect to Zmin or Zmax, to use adifferent compression algorithm. The media may further storeinstructions to perform a sequence including determining whether Zmin isgreater than Zmax and, if so, swapping precisions of Zmin and Zmax andusing an extra bit with Zmin. The media may further store instructionsto perform a sequence including determining whether Zmin is less thanZmax and, if so, using an extra bit to indicate that Zmin is less thanZmax. The media may further store instructions to perform a sequenceincluding detecting whether an index mask is all ones or zeros and, ifso, using unused bits of Zmin or Zmax to improve precision of referencevalues that are actually used. The media may further store instructionsto perform a sequence including if Zmin is less than Zmax, then usingthe next W×H bits as a clear mask to indicate whether the pixel iscleared or not, where W is a tile's width and H is a tile's height. Themedia may further store instructions to perform a sequence includingstoring depths in uncompressed form depending on how many non-cleareddepths exist. The media may further store instructions to perform asequence including determining more than two depth values per tile. Themedia may further store instructions to perform a sequence includingbreaking a tile into subtiles and assigning depth values to saidsubtiles, and selecting at least one subtile's depth value as a depthvalue of the tile.

In another example embodiment may be an apparatus comprising a processorto determine, using a hardware processor, Zmin and Zmax for depth offsetcompression; determine whether Zmin is substantially equal to Zmax; andif so, only using one of Zmin and Zmax for depth offset compression andrefraining from using an index mask, and a storage coupled to saidprocessor. The apparatus may include said processor to use bits saved byusing only one of Zmin or Zmax to extend residuals with one bit persample. The apparatus may include said processor to use bits, saved byavoiding the need to specify whether residuals are with respect to Zminor Zmax, to use a different compression algorithm. The apparatus mayinclude said processor to determine whether Zmin is greater than Zmaxand, if so, swapping precisions of Zmin and Zmax and using an extra bitwith Zmin. The apparatus may include said processor to determine whetherZmin is less than Zmax and, if so, using an extra bit to indicate thatZmin is less than Zmax. The apparatus may include said processor todetect whether an index mask is all ones or zeros and, if so, usingunused bits of Zmin or Zmax to improve precision of reference valuesthat are actually used. The apparatus may include said processor toinclude, if Zmin is less than Zmax, then use the next W×H bits as aclear mask to indicate whether the pixel is cleared or not, where W is atile's width and H is a tile's height. The apparatus may include saidprocessor to store depths in uncompressed form depending on how manynon-cleared depths exist. The apparatus may include said processor todetermine more than two depth values per tile. The apparatus may includesaid processor to break a tile into subtiles and assigning depth valuesto said subtiles, and selecting at least one subtile's depth value as adepth value of the tile. The apparatus may include a displaycommunicatively coupled to the processor. The apparatus may include abattery coupled to the processor.

References throughout this specification to “one embodiment” or “anembodiment” mean that a particular feature, structure, or characteristicdescribed in connection with the embodiment is included in at least oneimplementation encompassed within the present disclosure. Thus,appearances of the phrase “one embodiment” or “in an embodiment” are notnecessarily referring to the same embodiment. Furthermore, theparticular features, structures, or characteristics may be instituted inother suitable forms other than the particular embodiment illustratedand all such forms may be encompassed within the claims of the presentapplication.

While a limited number of embodiments have been described, those skilledin the art will appreciate numerous modifications and variationstherefrom. It is intended that the appended claims cover all suchmodifications and variations as fall within the true spirit and scope ofthis disclosure.

What is claimed is:
 1. A method comprising: determining, using ahardware processor, minimum depth (Zmin), and maximum depth (Zmax),residuals and Zmin/Zmax-index selection mask for depth offsetcompression; transforming unneeded bits allocated for one compressionfunction to a different compression function; and detecting whether anindex mask is all ones or zeros, and, if so, using unneeded bits of Zminor Zmax to improve precision of the reference value or to redistributethe unneeded bits among the residuals.
 2. The method of claim 1determining ranges of Zmin and Zmax, determine Zmin and Zmax ranges thatoverlap, and identifying and reusing redundant bit combinations thatarise from overlapping Zmin and Zmax ranges.
 3. The method of claim 1including identifying a Zmin/Zmax pair comprising a Zmin that is relatedto a Zmax, determining whether the Zmin/Zmax-pair constitutes aredundant combination or is an invalid reference value pair for depthoffset compression, and if a Zmin/Zmax pair constitutes either aredundant combination or is an invalid reference value pair, using adifferent depth offset compression scheme, or a different compressionalgorithm altogether with the remaining bits.
 4. The method of claim 3including reusing the unneeded bits to extend residuals with one bit persample.
 5. The method of claim 1 including determining whether Zmin isgreater than Zmax and, if so, swapping bits for Zmin with bits for Zmaxand adding an extra bit to Zmin to improve precision of Zmin.
 6. Themethod of claim 1 including, if Zmin is greater than Zmax, then usingthe next W by H bits as a clear mask to indicate whether the pixel iscleared or not, where W is a tile's width and H is a tile's height. 7.The method of claim 6 including, depending on how many non-cleareddepths exist, storing depths in uncompressed form.
 8. The method ofclaim 1 including for a tile being compressed, determining more than twodepth values per tile.
 9. The method of claim 8 including breaking atile into subtiles and assigning one or more reference depth values toeach of the said subtiles.
 10. The method of claim 1 includingtransforming unneeded bits of color data allocated to one compressionfunction to a different compression function.
 11. One or morenon-transitory computer readable media storing instructions executed bya processor to perform a sequence comprising: determining, using ahardware processor, minimum depth (Zmin) and maximum depth, (Zmax) fordepth offset compression; determining residual bits per depth withrespect to at least one of Zmin or Zmax that are unused for depth offsetcompression; transforming unneeded bits allocated for one compressionfunction to a different compression function; and identifying aZmin/Zmax pair comprising a Zmin that is related to a Zmax, determiningwhether Zmin is equal to Zmax, and if a Zmin/Zmax pair constituteseither a redundant combination or is an invalid reference value pair,using a different depth offset compression scheme, or a differentcompression algorithm altogether with the remaining bits.
 12. The mediaof claim 11, determining ranges of Zmin and Zmax, determine Zmin andZmax ranges that overlap, and said sequence including identifying andusing redundant bit combinations that arise from overlapping Zmin andZmax ranges.
 13. The media of claim 11, said sequence including reusingthe unneeded bits to extend residuals with one bit per sample.
 14. Themedia of claim 11, said sequence including determining whether Zmin isgreater than Zmax and, if so, swapping bits for Zmin with bits for Zmaxand adding an extra bit to Zmin to improve precision of Zmin.
 15. Themedia of claim 11, said sequence including, if Zmin is greater thanZmax, then using the next W by H bits as a clear mask to indicatewhether the pixel is cleared or not, where W is a tile's width and H isa tile's height.
 16. The media of claim 15, said sequence including,depending on how many non-cleared depths exist, storing depths inuncompressed form.
 17. The media of claim 11, said sequence includingdetecting whether an index mask is all ones or zeros, and, if so, usingunneeded bits of Zmin or Zmax to improve precision of reference valuesthat, or to redistribute the unneeded bits among the residuals.
 18. Themedia of claim 11, said sequence including for a tile being compressed,determining more than two depth values per tile.
 19. The media of claim18, said sequence including breaking a tile into subtiles and assigningdepth values to each of said subtiles.
 20. The media of claim 11including transforming unneeded bits of color data allocated to onecompression function to a different compression function.
 21. Anapparatus comprising: determine, using a hardware processor, minimumdepth (Zmin) and maximum depth (Zmax) for depth offset compression,determine residual bits per depth with respect to at least one of Zminor Zmax that are unused for depth offset compression, transform unneededbits allocated for one function compression to a different compressionfunction, determine whether Zmin is greater than Zmax and, if so,swapping bits for Zmin with bits for Zmax and add an extra bit to Zminto improve precision of Zmin; and a storage coupled to said processor.22. The apparatus of claim 21, said processor to determine ranges ofZmin and Zmax, determine Zmin and Zmax ranges that overlap, and identifyand use redundant bit combinations that arise from overlapping Zmin andZmax ranges.
 23. The apparatus of claim 21, said processor to identify aZmin/Zmax pair comprising a Zmin that is related to a Zmax, determinewhether Zmin is equal to Zmax, and if a Zmin/Zmax pair constituteseither a redundant combination or is an invalid reference value pair,use a different depth offset compression scheme, or a differentcompression algorithm altogether with the remaining bits.
 24. Theapparatus of claim 21, said processor to reuse the unneeded bits toextend residuals with one bit per sample.
 25. The apparatus of claim 21,said processor to, if Zmin is greater than Zmax, then using the next Wby H bits as a clear mask to indicate whether the pixel is cleared ornot, where W is a tile's width and H is a tile's height.
 26. Theapparatus of claim 21, said processor to depend on how many non-cleareddepths exist, store depths in uncompressed form.
 27. The apparatus ofclaim 21, said processor to detect whether an index mask is all ones orzeros, and, if so, use unneeded bits of Zmin or Zmax to improveprecision of reference values that, or to redistribute the unneeded bitsamong the residuals.
 28. An apparatus for depth testing comprising:means for determining, using a hardware processor, minimum depth (Zmin),and maximum depth(Zmax), residuals and Zmin/Zmax-index selection maskfor depth offset compression; means for transforming unneeded bitsallocated for one compression function to a different compressionfunction; means for detecting whether an index mask is all ones orzeros, and, if so, using unneeded bits of Zmin or Zmax to improveprecision of the reference value or to redistribute the unneeded bitsamong the residuals; and means for using the next W by H bits as a clearmask to indicate whether the pixel is cleared or not, where W is atile's width and H is a tile's height if Zmin is greater than Zmax. 29.The apparatus of claim 28 including means for determining ranges of Zminand Zmax, determine Zmin and Zmax ranges that overlap, and identifyingand reusing redundant bit combinations that arise from overlapping Zminand Zmax ranges.
 30. The apparatus of claim 28 including means foridentifying a Zmin/Zmax pair comprising a Zmin that is related to aZmax, determining whether the Zmin/Zmax-pair constitutes a redundantcombination or is an invalid reference value pair for depth offsetcompression, and if a Zmin/Zmax pair constitutes either a redundantcombination or is an invalid reference value pair, using a differentdepth offset compression scheme, or a different compression algorithmaltogether with the remaining bits.
 31. The apparatus of claim 30including means for reusing the unneeded bits to extend residuals withone bit per sample.
 32. The apparatus of claim 28 including means fordetermining whether Zmin is greater than Zmax and, if so, swapping bitsfor Zmin with bits for Zmax and adding an extra bit to Zmin to improveprecision of Zmin.
 33. The apparatus of claim 28 including means forstoring depths in uncompressed form depending on how many non-cleareddepths exist.
 34. The apparatus of claim 28 including means fordetecting whether an index mask is all ones or zeros, and, if so, usingunneeded bits of Zmin or Zmax to improve precision of the referencevalue or to redistribute the unneeded bits among the residuals.
 35. Theapparatus of claim 28 including for a tile being compressed, means fordetermining more than two depth values per tile.
 36. The apparatus ofclaim 35 including means for breaking a tile into subtiles and assigningone or more reference depth values to each of the said subtiles.
 37. Theapparatus of claim 28 including means for transforming unneeded bits ofcolor data allocated to one compression function to a differentcompression function.